| Fully Qualified Name: | CodeIgniter\Test\Mock\MockCodeIgniter |
| Extends: | CodeIgniter |
| Name | Description | Defined By |
|---|---|---|
| __construct() | Constructor. | CodeIgniter |
| cache() | Tells the app that the final output should be cached. | CodeIgniter |
| cachePage() | Caches the full response from the current request. Used for full-page caching for very high performance. | CodeIgniter |
| displayCache() | Determines if a response has been cached for the given URI. | CodeIgniter |
| displayPerformanceMetrics() | Replaces the memory_usage and elapsed_time tags. | CodeIgniter |
| getPerformanceStats() | Returns an array with our basic performance stats collected. | CodeIgniter |
| initialize() | Handles some basic app and environment setup. | CodeIgniter |
| run() | Launch the application! | CodeIgniter |
| setPath() | Allows the request path to be set from outside the class, instead of relying on CLIRequest or IncomingRequest for the path. | CodeIgniter |
| setRequest() | Sets a Request object to be used for this request. | CodeIgniter |
| spoofRequestMethod() | Modifies the Request Object to use a different method if a POST variable called _method is found. | CodeIgniter |
| storePreviousURL() | If we have a session object to use, store the current URI as the previous URI. This is called just prior to sending the response to the client, and will make it available next request. | CodeIgniter |
| useSafeOutput() | Set our Response instance to "pretend" mode so that things like cookies and headers are not actually sent, allowing PHP 7.2+ to not complain when ini_set() function is used. | CodeIgniter |
Constructor.
| Parameter Name | Type | Description |
|---|---|---|
| $config | \type |
Returns:
Tells the app that the final output should be cached.
| Parameter Name | Type | Description |
|---|---|---|
| $time | int |
Returns: void
Caches the full response from the current request. Used for full-page caching for very high performance.
| Parameter Name | Type | Description |
|---|---|---|
| $config | \Config\Cache |
Returns: mixed
Determines if a response has been cached for the given URI.
| Parameter Name | Type | Description |
|---|---|---|
| $config | \Config\Cache |
Returns: bool|\CodeIgniter\HTTP\ResponseInterface
Replaces the memory_usage and elapsed_time tags.
| Parameter Name | Type | Description |
|---|---|---|
| $output | string |
Returns: string
Returns an array with our basic performance stats collected.
Returns: array
Handles some basic app and environment setup.
Returns:
Launch the application!
This is "the loop" if you will. The main entry point into the script that gets the required class instances, fires off the filters, tries to route the response, loads the controller and generally makes all of the pieces work together.
| Parameter Name | Type | Description |
|---|---|---|
| $routes | \CodeIgniter\Router\RouteCollectionInterface | |
| $returnResponse | bool |
Returns: bool|\CodeIgniter\HTTP\RequestInterface|\CodeIgniter\HTTP\Response|\CodeIgniter\HTTP\ResponseInterface|mixed
Allows the request path to be set from outside the class, instead of relying on CLIRequest or IncomingRequest for the path.
This is primarily used by the Console.
| Parameter Name | Type | Description |
|---|---|---|
| $path | string |
Returns: $this
Sets a Request object to be used for this request.
Used when running certain tests.
| Parameter Name | Type | Description |
|---|---|---|
| $request | \CodeIgniter\HTTP\Request |
Returns: \CodeIgniter\CodeIgniter
Modifies the Request Object to use a different method if a POST variable called _method is found.
Returns:
If we have a session object to use, store the current URI as the previous URI. This is called just prior to sending the response to the client, and will make it available next request.
This helps provider safer, more reliable previous_url() detection.
| Parameter Name | Type | Description |
|---|---|---|
| $uri | \CodeIgniter\HTTP\URI |
Returns:
Set our Response instance to "pretend" mode so that things like cookies and headers are not actually sent, allowing PHP 7.2+ to not complain when ini_set() function is used.
| Parameter Name | Type | Description |
|---|---|---|
| $safe | bool |
Returns: $this